package com.javafactroy.kunlong.domain;

import com.javafactroy.kunlong.data.dto.SysAmapApiDto;
import com.javafactroy.kunlong.data.service.SysAmapApiService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.stream.Collectors;

@Repository
public class SysAmapRepository {

    @Autowired
    SysAmapApiService service;

    List<SysAmapApiDto> loadAll() {
        List<SysAmapApiDto> list = service.selectAll();
        return list.stream().filter(i->i.getLevel().equals(1)).collect(Collectors.toList());
    }
}
